package com.yf.train.modules.train.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yf.train.modules.train.dto.RepoTrainDTO;
import com.yf.train.modules.train.dto.request.RepoTrainReqDTO;
import com.yf.train.modules.train.entity.RepoTrain;
import org.apache.ibatis.annotations.Param;

/**
* <p>
* 题库训练Mapper
* </p>
*
* @author 聪明笨狗
* @since 2022-03-01 18:42
*/
public interface RepoTrainMapper extends BaseMapper<RepoTrain> {

    /**
     * 训练记录列表分页
     * @param page
     * @param query
     * @return
     */
    IPage<RepoTrainDTO> paging(Page page, @Param("query") RepoTrainReqDTO query);

    /**
     * 查找训练进度
     * @param userId
     * @param repoId
     * @return
     */
    RepoTrainDTO checkProcess(@Param("userId") String userId, @Param("repoId") String repoId);

}
